
const fs = require('fs'),
  path = require('path'),
  antDesignStyleRootPath = path.resolve(__dirname, '../../node_modules/ant-design-vue/es/style'),
  lessFiles = []

function getAntDesignLess (dir) {
  dir = dir || antDesignStyleRootPath
  fs.readdirSync(dir).forEach(f => {
    const stat = fs.statSync(path.join(dir, f))
    if (f.endsWith('.less')) {
      lessFiles.push({
        filepath: path.join(dir, f),
        content: fs.readFileSync(path.join(dir, f), 'utf8')
      })
    } else if (stat.isDirectory()) {
      getAntDesignLess(path.join(dir, f))
    }
  })
}

/**
 * 提取与 font-size-base 有关的所有变量
 */
function collectVariables () {

}

getAntDesignLess()
console.log(lessFiles)
debugger